package org.ly817.my.spring.core.aop;

import org.aopalliance.intercept.MethodInterceptor;
import org.ly817.my.spring.core.aop.pointcut.MethodMatcher;


/**
 * 织入关系的元信息
 * 切入逻辑和被代理类之间的映射
 * <p>
 * advice - 通知 - 名词 侧重动作        某个连接点所采用的处理逻辑
 * advisor- 建议 - 名词 侧重动作的执行者 Pointcut和Advice的配置器
 * advise - 建议 - 动词
 *
 * @author LuoYu
 * @date 2018/4/15
 */
public class AdviceSupport {
    /**
     * 被代理对象信息
     */
    private TargetSource targetSource;

    /**
     * 方法拦截器
     * aop联盟提供的规范
     * 作用：代理advice（织入事务）方法
     */
    private MethodInterceptor methodInterceptor;

    private MethodMatcher methodMatcher;

    public TargetSource getTargetSource() {
        return targetSource;
    }

    public void setTargetSource(TargetSource targetSource) {
        this.targetSource = targetSource;
    }

    public MethodInterceptor getMethodInterceptor() {
        return methodInterceptor;
    }

    public void setMethodInterceptor(MethodInterceptor methodInterceptor) {
        this.methodInterceptor = methodInterceptor;
    }

    public MethodMatcher getMethodMatcher() {
        return methodMatcher;
    }

    public void setMethodMatcher(MethodMatcher methodMatcher) {
        this.methodMatcher = methodMatcher;
    }
}
